New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: fix write/read roundtrips with empty Table dumped to ECSV #15885
BUG: fix write/read roundtrips with empty Table dumped to ECSV #15885
Conversation
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
👋 Thank you for your draft pull request! Do you know that you can use |
8305441
to
451f438
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that looks good! Just a request to actually check that the re-read table is empty
astropy/io/ascii/tests/test_ecsv.py
Outdated
# see https://github.com/astropy/astropy/issues/13191 | ||
sfile = tmp_path / "x.ecsv" | ||
Table().write(sfile) | ||
Table.read(sfile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a
t = Table.read(sfile)
assert len(t) == 0
assert len(t.colnames) == 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done !
451f438
to
70e210d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks! @meeseeksdev backport to v6.0.x |
…Table dumped to ECSV
…885-on-v6.0.x Backport PR #15885 on branch v6.0.x (BUG: fix write/read roundtrips with empty Table dumped to ECSV)
Description
Fixes #13191